package de.wesemann.jdedun.entities.mediahandbook.companies;

import java.util.List;

import de.wesemann.jdedun.entities.AbstractEntity;

public class MediahandbookCompany extends AbstractEntity {
    /** die id von leipzig.de */
    private int old_id;
    /** id des Teilmarktes in dem das Unternehmen tätig ist, siehe Branches */
    private int sub_market_id;
    /**
     * id der Branche in der das Unternehmen tätig // ist (veraltet, bitte nur
     * sub_market verwenden
     */
    private int main_branch_id;
    /**
     * Liste der ids der Branchen in dem das Unternehmen tätig ist (veraltet,
     * bitte nur sub_market verwenden
     */
    List<String> sub_branches;
    /** Name der Firma */
    private String name;
    /** offizieller Straßenname, “-Straße” ausschreiben! */
    private String street;
    /**
     * nur EINE Zahl, für alles weitere das Feld housnumber_additional verwenden
     */
    private int housenumber;
    /**
     * Zusatz zur Hausnummer: z.B. -45, a, Tor B, Gebäude 5, Aufgang G
     */
    private String housenumber_additional;
    /**
     * fünfstellige Postleitzahl (String, keine Zahl siehe Postleitzahlen auf
     * Wikipedia)
     */
    private String postcode;
    /**
     * offizieller Name des Ortes, Halle (Saale) → korrekt, Halle an der Saale →
     * falsch
     */
    private String city;
    /**
     * eine primäre Rufummer nach DIN 5008, z.B. “0341 12234” oder “+49 341
     * 1234-5” (Schreibweisen auf Wikipedia)
     */
    private String phone_primary;
    /** sekundäre Rufnummer siehe phone_primary */
    private String phone_secondary;
    /** siehe phone_primary */
    private String fax_primary;
    /** siehe phone_primary */
    private String fax_secondary;
    /** siehe phone_primary */
    private String mobile_primary;
    /** siehe phone_primary */
    private String mobile_secondary;
    /** eine Emailadresse */
    private String email_primary;
    /** eine Emailadresse */
    private String email_secondary;
    /** eine Internetadresse beginnend mit http:// */
    private String url_secondary;
    /** eine Internetadresse beginnend mit http:// */
    private String url_primary;
    /** Beschreibung der Unternehmenstätigkeit */
    private String main_activity;
    /** Hauptprodukte */
    private String products;
    /** Ressourcen im Besitz der Firma */
    private String resources;
    /** Referenzkunden der Firma */
    private String past_customers;
    /**
     * Die Leute die in der Firma arbeiten (nur die ID siehe
     * Mediahandbook/people)
     */
    private List<Integer> people;
    /** ??? */
    private String mkw_branch_id;

    /**
     * die id von leipzig.de
     * 
     * @return the old_id
     */
    public int getOld_id() {
	return old_id;
    }

    /**
     * die id von leipzig.de
     * 
     * @param old_id
     *            the old_id to set
     */
    public void setOld_id(int old_id) {
	this.old_id = old_id;
    }

    /**
     * id des Teilmarktes in dem das Unternehmen tätig ist, siehe Branches
     * 
     * @return the sub_market_id
     */
    public int getSub_market_id() {
	return sub_market_id;
    }

    /**
     * id des Teilmarktes in dem das Unternehmen tätig ist, siehe Branches
     * 
     * @param sub_market_id
     *            the sub_market_id to set
     */
    public void setSub_market_id(int sub_market_id) {
	this.sub_market_id = sub_market_id;
    }

    /**
     * id der Branche in der das Unternehmen tätig ist (veraltet, bitte nur
     * sub_market verwenden
     * 
     * @return the main_branch_id
     */
    public int getMain_branch_id() {
	return main_branch_id;
    }

    /**
     * id der Branche in der das Unternehmen tätig ist (veraltet, bitte nur
     * sub_market verwenden
     * 
     * @param main_branch_id
     *            the main_branch_id to set
     */
    public void setMain_branch_id(int main_branch_id) {
	this.main_branch_id = main_branch_id;
    }

    /**
     * Liste der ids der Branchen in dem das Unternehmen tätig ist (veraltet,
     * bitte nur sub_market verwenden
     * 
     * @return the sub_branches
     */
    public List<String> getSub_branches() {
	return sub_branches;
    }

    /**
     * Liste der ids der Branchen in dem das Unternehmen tätig ist (veraltet,
     * bitte nur sub_market verwenden
     * 
     * @param sub_branches
     *            the sub_branches to set
     */
    public void setSub_branches(List<String> sub_branches) {
	this.sub_branches = sub_branches;
    }

    /**
     * Name der Firma
     * 
     * @return the name
     */
    public String getName() {
	return name;
    }

    /**
     * Name der Firma
     * 
     * @param name
     *            the name to set
     */
    public void setName(String name) {
	this.name = name;
    }

    /**
     * offizieller Straßenname, “-Straße” ausschreiben!
     * 
     * @return the street
     */
    public String getStreet() {
	return street;
    }

    /**
     * offizieller Straßenname, “-Straße” ausschreiben!
     * 
     * @param street
     *            the street to set
     */
    public void setStreet(String street) {
	this.street = street;
    }

    /**
     * nur EINE Zahl, für alles weitere das Feld housnumber_additional verwenden
     * 
     * @return the housenumber
     */
    public int getHousenumber() {
	return housenumber;
    }

    /**
     * nur EINE Zahl, für alles weitere das Feld housnumber_additional verwenden
     * 
     * @param housenumber
     *            the housenumber to set
     */
    public void setHousenumber(int housenumber) {
	this.housenumber = housenumber;
    }

    /**
     * Zusatz zur Hausnummer: z.B. -45, a, Tor B, Gebäude 5, Aufgang G
     * 
     * @return the housenumber_additional
     */
    public String getHousenumber_additional() {
	return housenumber_additional;
    }

    /**
     * Zusatz zur Hausnummer: z.B. -45, a, Tor B, Gebäude 5, Aufgang G
     * 
     * @param housenumber_additional
     *            the housenumber_additional to set
     */
    public void setHousenumber_additional(String housenumber_additional) {
	this.housenumber_additional = housenumber_additional;
    }

    /**
     * fünfstellige Postleitzahl (String, keine Zahl siehe Postleitzahlen auf
     * Wikipedia)
     * 
     * @return the postcode
     */
    public String getPostcode() {
	return postcode;
    }

    /**
     * fünfstellige Postleitzahl (String, keine Zahl siehe Postleitzahlen auf
     * Wikipedia)
     * 
     * @param postcode
     *            the postcode to set
     */
    public void setPostcode(String postcode) {
	this.postcode = postcode;
    }

    /**
     * offizieller Name des Ortes, Halle (Saale) → korrekt, Halle an der Saale →
     * falsch
     * 
     * @return the city
     */
    public String getCity() {
	return city;
    }

    /**
     * offizieller Name des Ortes, Halle (Saale) → korrekt, Halle an der Saale →
     * falsch
     * 
     * @param city
     *            the city to set
     */
    public void setCity(String city) {
	this.city = city;
    }

    /**
     * * eine primäre Rufummer nach DIN 5008, z.B. “0341 12234” oder “+49 341
     * 1234-5” (Schreibweisen auf Wikipedia)
     * 
     * @return the phone_primary
     */
    public String getPhone_primary() {
	return phone_primary;
    }

    /**
     * * eine primäre Rufummer nach DIN 5008, z.B. “0341 12234” oder “+49 341
     * 1234-5” (Schreibweisen auf Wikipedia)
     * 
     * @param phone_primary
     *            the phone_primary to set
     */
    public void setPhone_primary(String phone_primary) {
	this.phone_primary = phone_primary;
    }

    /**
     * siehe phone_primary
     * 
     * @return the phone_secondary
     */
    public String getPhone_secondary() {
	return phone_secondary;
    }

    /**
     * siehe phone_primary
     * 
     * @param phone_secondary
     *            the phone_secondary to set
     */
    public void setPhone_secondary(String phone_secondary) {
	this.phone_secondary = phone_secondary;
    }

    /**
     * siehe phone_primary
     * 
     * @return the fax_primary
     */
    public String getFax_primary() {
	return fax_primary;
    }

    /**
     * siehe phone_primary
     * 
     * @param fax_primary
     *            the fax_primary to set
     */
    public void setFax_primary(String fax_primary) {
	this.fax_primary = fax_primary;
    }

    /**
     * siehe phone_primary
     * 
     * @return the fax_secondary
     */
    public String getFax_secondary() {
	return fax_secondary;
    }

    /**
     * siehe phone_primary
     * 
     * @param fax_secondary
     *            the fax_secondary to set
     */
    public void setFax_secondary(String fax_secondary) {
	this.fax_secondary = fax_secondary;
    }

    /**
     * siehe phone_primary
     * 
     * @return the mobile_primary
     */
    public String getMobile_primary() {
	return mobile_primary;
    }

    /**
     * siehe phone_primary
     * 
     * @param mobile_primary
     *            the mobile_primary to set
     */
    public void setMobile_primary(String mobile_primary) {
	this.mobile_primary = mobile_primary;
    }

    /**
     * siehe phone_primary
     * 
     * @return the mobile_secondary
     */
    public String getMobile_secondary() {
	return mobile_secondary;
    }

    /**
     * siehe phone_primary
     * 
     * @param mobile_secondary
     *            the mobile_secondary to set
     */
    public void setMobile_secondary(String mobile_secondary) {
	this.mobile_secondary = mobile_secondary;
    }

    /**
     * eine Emailadresse
     * 
     * @return the email_primary
     */
    public String getEmail_primary() {
	return email_primary;
    }

    /**
     * eine Emailadresse
     * 
     * @param email_primary
     *            the email_primary to set
     */
    public void setEmail_primary(String email_primary) {
	this.email_primary = email_primary;
    }

    /**
     * eine Emailadresse
     * 
     * @return the email_secondary
     */
    public String getEmail_secondary() {
	return email_secondary;
    }

    /**
     * eine Emailadresse
     * 
     * @param email_secondary
     *            the email_secondary to set
     */
    public void setEmail_secondary(String email_secondary) {
	this.email_secondary = email_secondary;
    }

    /**
     * eine Internetadresse beginnend mit http://
     * 
     * @return the url_secondary
     */
    public String getUrl_secondary() {
	return url_secondary;
    }

    /**
     * eine Internetadresse beginnend mit http://
     * 
     * @param url_secondary
     *            the url_secondary to set
     */
    public void setUrl_secondary(String url_secondary) {
	this.url_secondary = url_secondary;
    }

    /**
     * eine Internetadresse beginnend mit http://
     * 
     * @return the url_primary
     */
    public String getUrl_primary() {
	return url_primary;
    }

    /**
     * eine Internetadresse beginnend mit http://
     * 
     * @param url_primary
     *            the url_primary to set
     */
    public void setUrl_primary(String url_primary) {
	this.url_primary = url_primary;
    }

    /**
     * Beschreibung der Unternehmenstätigkeit
     * 
     * @return the main_activity
     */
    public String getMain_activity() {
	return main_activity;
    }

    /**
     * Beschreibung der Unternehmenstätigkeit
     * 
     * @param main_activity
     *            the main_activity to set
     */
    public void setMain_activity(String main_activity) {
	this.main_activity = main_activity;
    }

    /**
     * Hauptprodukte
     * 
     * @return the products
     */
    public String getProducts() {
	return products;
    }

    /**
     * Hauptprodukte
     * 
     * @param products
     *            the products to set
     */
    public void setProducts(String products) {
	this.products = products;
    }

    /**
     * Ressourcen im Besitz der Firma
     * 
     * @return the resources
     */
    public String getResources() {
	return resources;
    }

    /**
     * Ressourcen im Besitz der Firma
     * 
     * @param resources
     *            the resources to set
     */
    public void setResources(String resources) {
	this.resources = resources;
    }

    /**
     * Referenzkunden der Firma
     * 
     * @return the past_customers
     */
    public String getPast_customers() {
	return past_customers;
    }

    /**
     * Referenzkunden der Firma
     * 
     * @param past_customers
     *            the past_customers to set
     */
    public void setPast_customers(String past_customers) {
	this.past_customers = past_customers;
    }

    /**
     * Die Leute die in der Firma arbeiten (nur die ID siehe
     * Mediahandbook/people)
     * 
     * @return the people
     */
    public List<Integer> getPeople() {
	return people;
    }

    /**
     * Die Leute die in der Firma arbeiten (nur die ID siehe
     * Mediahandbook/people)
     * 
     * @param people
     *            the people to set
     */
    public void setPeople(List<Integer> people) {
	this.people = people;
    }

    /**
     * ???
     * 
     * @return the mkw_branch_id
     */
    public String getMkw_branch_id() {
	return mkw_branch_id;
    }

    /**
     * ???
     * 
     * @param mkw_branch_id
     *            the mkw_branch_id to set
     */
    public void setMkw_branch_id(String mkw_branch_id) {
	this.mkw_branch_id = mkw_branch_id;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
	final int prime = 31;
	int result = super.hashCode();
	result = prime * result + ((city == null) ? 0 : city.hashCode());
	result = prime * result
		+ ((email_primary == null) ? 0 : email_primary.hashCode());
	result = prime * result
		+ ((email_secondary == null) ? 0 : email_secondary.hashCode());
	result = prime * result
		+ ((fax_primary == null) ? 0 : fax_primary.hashCode());
	result = prime * result
		+ ((fax_secondary == null) ? 0 : fax_secondary.hashCode());
	result = prime * result + housenumber;
	result = prime
		* result
		+ ((housenumber_additional == null) ? 0
			: housenumber_additional.hashCode());
	result = prime * result
		+ ((main_activity == null) ? 0 : main_activity.hashCode());
	result = prime * result + main_branch_id;
	result = prime * result
		+ ((mkw_branch_id == null) ? 0 : mkw_branch_id.hashCode());
	result = prime * result
		+ ((mobile_primary == null) ? 0 : mobile_primary.hashCode());
	result = prime
		* result
		+ ((mobile_secondary == null) ? 0 : mobile_secondary.hashCode());
	result = prime * result + ((name == null) ? 0 : name.hashCode());
	result = prime * result + old_id;
	result = prime * result
		+ ((past_customers == null) ? 0 : past_customers.hashCode());
	result = prime * result + ((people == null) ? 0 : people.hashCode());
	result = prime * result
		+ ((phone_primary == null) ? 0 : phone_primary.hashCode());
	result = prime * result
		+ ((phone_secondary == null) ? 0 : phone_secondary.hashCode());
	result = prime * result
		+ ((postcode == null) ? 0 : postcode.hashCode());
	result = prime * result
		+ ((products == null) ? 0 : products.hashCode());
	result = prime * result
		+ ((resources == null) ? 0 : resources.hashCode());
	result = prime * result + ((street == null) ? 0 : street.hashCode());
	result = prime * result
		+ ((sub_branches == null) ? 0 : sub_branches.hashCode());
	result = prime * result + sub_market_id;
	result = prime * result
		+ ((url_primary == null) ? 0 : url_primary.hashCode());
	result = prime * result
		+ ((url_secondary == null) ? 0 : url_secondary.hashCode());
	return result;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
	if (this == obj) {
	    return true;
	}
	if (!super.equals(obj)) {
	    return false;
	}
	if (getClass() != obj.getClass()) {
	    return false;
	}
	MediahandbookCompany other = (MediahandbookCompany) obj;
	if (city == null) {
	    if (other.city != null) {
		return false;
	    }
	} else if (!city.equals(other.city)) {
	    return false;
	}
	if (email_primary == null) {
	    if (other.email_primary != null) {
		return false;
	    }
	} else if (!email_primary.equals(other.email_primary)) {
	    return false;
	}
	if (email_secondary == null) {
	    if (other.email_secondary != null) {
		return false;
	    }
	} else if (!email_secondary.equals(other.email_secondary)) {
	    return false;
	}
	if (fax_primary == null) {
	    if (other.fax_primary != null) {
		return false;
	    }
	} else if (!fax_primary.equals(other.fax_primary)) {
	    return false;
	}
	if (fax_secondary == null) {
	    if (other.fax_secondary != null) {
		return false;
	    }
	} else if (!fax_secondary.equals(other.fax_secondary)) {
	    return false;
	}
	if (housenumber != other.housenumber) {
	    return false;
	}
	if (housenumber_additional == null) {
	    if (other.housenumber_additional != null) {
		return false;
	    }
	} else if (!housenumber_additional.equals(other.housenumber_additional)) {
	    return false;
	}
	if (main_activity == null) {
	    if (other.main_activity != null) {
		return false;
	    }
	} else if (!main_activity.equals(other.main_activity)) {
	    return false;
	}
	if (main_branch_id != other.main_branch_id) {
	    return false;
	}
	if (mkw_branch_id == null) {
	    if (other.mkw_branch_id != null) {
		return false;
	    }
	} else if (!mkw_branch_id.equals(other.mkw_branch_id)) {
	    return false;
	}
	if (mobile_primary == null) {
	    if (other.mobile_primary != null) {
		return false;
	    }
	} else if (!mobile_primary.equals(other.mobile_primary)) {
	    return false;
	}
	if (mobile_secondary == null) {
	    if (other.mobile_secondary != null) {
		return false;
	    }
	} else if (!mobile_secondary.equals(other.mobile_secondary)) {
	    return false;
	}
	if (name == null) {
	    if (other.name != null) {
		return false;
	    }
	} else if (!name.equals(other.name)) {
	    return false;
	}
	if (old_id != other.old_id) {
	    return false;
	}
	if (past_customers == null) {
	    if (other.past_customers != null) {
		return false;
	    }
	} else if (!past_customers.equals(other.past_customers)) {
	    return false;
	}
	if (people == null) {
	    if (other.people != null) {
		return false;
	    }
	} else if (!people.equals(other.people)) {
	    return false;
	}
	if (phone_primary == null) {
	    if (other.phone_primary != null) {
		return false;
	    }
	} else if (!phone_primary.equals(other.phone_primary)) {
	    return false;
	}
	if (phone_secondary == null) {
	    if (other.phone_secondary != null) {
		return false;
	    }
	} else if (!phone_secondary.equals(other.phone_secondary)) {
	    return false;
	}
	if (postcode == null) {
	    if (other.postcode != null) {
		return false;
	    }
	} else if (!postcode.equals(other.postcode)) {
	    return false;
	}
	if (products == null) {
	    if (other.products != null) {
		return false;
	    }
	} else if (!products.equals(other.products)) {
	    return false;
	}
	if (resources == null) {
	    if (other.resources != null) {
		return false;
	    }
	} else if (!resources.equals(other.resources)) {
	    return false;
	}
	if (street == null) {
	    if (other.street != null) {
		return false;
	    }
	} else if (!street.equals(other.street)) {
	    return false;
	}
	if (sub_branches == null) {
	    if (other.sub_branches != null) {
		return false;
	    }
	} else if (!sub_branches.equals(other.sub_branches)) {
	    return false;
	}
	if (sub_market_id != other.sub_market_id) {
	    return false;
	}
	if (url_primary == null) {
	    if (other.url_primary != null) {
		return false;
	    }
	} else if (!url_primary.equals(other.url_primary)) {
	    return false;
	}
	if (url_secondary == null) {
	    if (other.url_secondary != null) {
		return false;
	    }
	} else if (!url_secondary.equals(other.url_secondary)) {
	    return false;
	}
	return true;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("MediahandbookCompany [old_id=").append(old_id)
		.append(", sub_market_id=").append(sub_market_id)
		.append(", main_branch_id=").append(main_branch_id)
		.append(", sub_branches=").append(sub_branches)
		.append(", name=").append(name).append(", street=")
		.append(street).append(", housenumber=").append(housenumber)
		.append(", housenumber_additional=")
		.append(housenumber_additional).append(", postcode=")
		.append(postcode).append(", city=").append(city)
		.append(", phone_primary=").append(phone_primary)
		.append(", phone_secondary=").append(phone_secondary)
		.append(", fax_primary=").append(fax_primary)
		.append(", fax_secondary=").append(fax_secondary)
		.append(", mobile_primary=").append(mobile_primary)
		.append(", mobile_secondary=").append(mobile_secondary)
		.append(", email_primary=").append(email_primary)
		.append(", email_secondary=").append(email_secondary)
		.append(", url_secondary=").append(url_secondary)
		.append(", url_primary=").append(url_primary)
		.append(", main_activity=").append(main_activity)
		.append(", products=").append(products).append(", resources=")
		.append(resources).append(", past_customers=")
		.append(past_customers).append(", people=").append(people)
		.append(", mkw_branch_id=").append(mkw_branch_id).append("]");
	return builder.toString();
    }

}
